<template>
	<view class="page">
		<!-- :style="'height:'+scrollviewHigh+'px;'" -->
		<scroll-view scroll-y="true" class="scroll-Y">
			<view class="oldBox">
				<view class="mainBox">
					<view class="title">
						商品设置
					</view>
					<view class="">
						<picker @change="changeBrand($event)" data-info="商品" :value="brandVal" :range="brandCol"
							:range-key="'product_name'">
							<view class="infoItem">
								<view class="">
									选择商品：
								</view>
								<view class="rightText">
									{{ brandName }}
								</view>
							</view>
						</picker>
					</view>
					<view v-for="(item, index) in spec_attr" :key="index">
						<view class="" v-if="!item.group_name.includes('期')">
							<picker @change="specChangeModel($event, index)" :data-info="item.group_name"
								:value="item.item_value" :range="item.spec_items" :range-key="'spec_value'"
								:disabled="brandName == '请选择品牌'">
								<view class="infoItem">
									<view class="">
										{{ item.group_name }}
									</view>
									<view class="rightText">
										{{ item.item_name || '请选择' }}
									</view>
								</view>
							</picker>
						</view>
					</view>
				</view>
				<view class="mainBox">
					<view class="title">
						定价设置
					</view>
					<view class="">
						<view class="infoItem">
							<view class="">
								单品总租金
							</view>
							<view class="" style="display: flex;">
								<input type="number" placeholder="请输入租金价格" v-model="price" @blur="getBill"
									style="font-size: 25rpx;text-align: end;" />
							</view>
						</view>
						<view class="infoItem">
							<view class="">
								单品押金
							</view>
							<view class="" style="display: flex;">
								<input type="number" placeholder="请输入租金价格" v-model="deposit"
									style="font-size: 25rpx;text-align: end;" />
							</view>
						</view>
						<view class="infoItem">
							<view class="">
								开始时间
							</view>
							<view class="" style="display: flex;">
								<picker start="2025-01-01" mode="date" :value="start_time" @change="startDateChange">
									<view class="uni-input">{{ start_time }}</view>
								</picker>
							</view>
						</view>
						<view class="infoItem">
							<view class="">
								结束时间
							</view>
							<view class="" style="display: flex;">
								<picker start="2025-01-01" mode="date" :value="date" @change="endDateChange">
									<view class="uni-input">{{ end_time }}</view>
								</picker>
							</view>
						</view>
					</view>
				</view>
				<view class="mainBox" style="margin-bottom: 200rpx;" v-if="orderBill.length > 0">
					<view class="title">
						账单明细：
					</view>
					<view class="" v-for="(item, index) in orderBill" :key="index">
						<view class="Pitem1">
							<view class="Pitem1Time">
								<span>第{{ item.current_period }}期</span>
							</view>
							<view class="Pitem1Time">
								<span>{{ item.repayment_date }}</span>
							</view>
							<view class="">
								￥{{ ((item.price) * 1).toFixed(2) }}
							</view>
							<view class="">
								<view style="color: #3FD2CC;" @click="eidtPrice(item, index)">修改</view>
							</view>
						</view>
					</view>
					<div class="Pitem1" style="background: none;">
						<p>期数：<span style="color: #3FD2CC;">共{{ orderBill.length }}期</span></p>
						<p>还款总租金：<span style="color: #3FD2CC;">{{ totalRental }}元</span></p>
					</div>
				</view>


			</view>
		</scroll-view>
		<!-- 底部 下一页 -->
		<view class="botBox" id="botBox">
			<button v-if="!token" class="nextPage" @getAuthorize="onGetAuthorize" open-type="getAuthorize"
				scope="phoneNumber" onError="handleAuthError">
				下一步
			</button>
			<view class="nextPage" @click="nextStep" v-else>
				下一步
			</view>
		</view>
		<u-popup :show="showLogin" round="16rpx" mode="center" :safeAreaInsetBottom="false" closeColor="#fff"
			@close="showLogin = false" closeable closeIconPos="bottom-center">
			<view class="" style="width: 65vw;padding: 21px 21px 0 21px">
				<view class="" style="width: 100%;font-weight: bold;font-size: 0.32rem;">
					每期租金填写
				</view>
				<view class="withd-bct" style="margin: 10px 0;">
					<view style="height: 100%;display: flex;align-items: center;">
						<text style="font-size: 48rpx;">￥</text>
						<input class="tx-inpt" name="money" v-model="editJe" type="number" />
					</view>
				</view>
			</view>
			<view class="d-c-c d-c" style="padding: 0 0 30rpx 0">
				<button class=""
					style="color: #fff; margin-top: 20rpx; border-radius: 80rpx; width: 400rpx; height: 80rpx; text-align: center; line-height: 80rpx; background: #5BC5BB;"
					@getAuthorize="editTrue" open-type="getAuthorize" scope="phoneNumber" onError="handleAuthError">
					确定
				</button>
			</view>
		</u-popup>
	</view>
</template>
<script>
import { getAlipayAuthCode } from '@/utils/alipay';
import {
	pay
} from '@/common/pay.js';
export default {
	data() {
		return {
			token: '',
			// 以租代购标识  0 正常  4 以租代购
			car_lease: 1,
			// 品牌参数
			product_id: '',
			product_id: '',
			// 新旧机区别 0新机 1旧机
			new_machine: 1,
			// 商品指导价
			guide_price: '',
			specSkuId: '',


			// 商品
			brandCol: [],
			brandVal: 0,
			brandName: '请选择商品',
			// 商品详情
			spec_attr: [],
			spec_list: [],
			start_time: '请选择开始时间',
			end_time: '请选择结束时间',
			deposit: '',
			price: '',
			orderBill: [],
			showLogin: false,
			editJe: 0,
			editIndex: 0,
			totalRental: 0,

			// 型号数据
			modelCol: [],
			modelVal: 0,
			modelName: '请选择型号',
			// 内存数据
			memoryCol: [],
			memoryVal: 0,
			memoryName: '请选择内存',
			// 颜色
			colorCol: [],
			colorVal: 0,
			colorName: '请选择颜色',
			// 成色
			chengseCol: [],
			chengseVal: 0,
			chengseName: '请选择成色',
			// 芝麻信用分范围
			sesame_credit_score_arr: [{
				name: '400以下',
				sesame_credit_score_range: 1
			},
			{
				name: '400-500',
				sesame_credit_score_range: 2
			},
			{
				name: '500以上',
				sesame_credit_score_range: 3
			},
			{
				name: '老用户专属',
				sesame_credit_score_range: 4
			},
			],
			sesame_credit_score_range: '',
			// 首付金额数据
			downpayCol: [],
			downpayCol1: [],
			downpayCol_1: [],
			downpayVal: 0,
			downpayName: '请选择购机优惠',
			// 账单明细
			billData: [],
			// 售价

			// 订单总额
			totlePrice: '',
			//原价
			reallyPrice: '',
			// 租机费用
			// service: '',
			// 首单配置比例
			down_payment_ratio: '',
			down_payment_ratio_shou: '',
			// 末期自定义期数
			late: '',
			// 末期自定义期数金额
			rent: '',
			// 花呗总额度
			total_credit_limit_of_huabei: '',
			// 芝麻信用分
			sesame_credit_score: "",
			// 首付配置id
			down_payment: '',
			product_sku_id: '',
			active: -1,
			active1: -1,
			// 传递下单页面的新旧机参数 0 新机 1旧机
			old_and_new: '',
			// 接受商品规格
			skuData: [],
			// 不用内存不同的价格
			sku: [],
			scrollviewHigh: 0,
			//首期金额
			showFirstMoney: false,
			//账单明细
			showCountMeau: false,
			//租赁期数
			showZulin: false,
			zulinMonth: '',
			active2: -1,
			downpayColMonth: [],
			spec_sku_id: '',
			configuration: [],
			yield: "",
			shop_supplier_id: '',
		}
	},
	// created() {

	// 	this.getBrandData()
	// 	if (uni.getStorageSync('token')) {
	// 		this.token = uni.getStorageSync('token')
	// 	}
	// },
	onLoad(e) {
		this.shop_supplier_id = e.shop_supplier_id
		this.getBrandData()
		if (uni.getStorageSync('token')) {
			this.token = uni.getStorageSync('token')
		}
	},
	methods: {
		// 获取商品
		getBrandData() {
			let self = this;
			self._post('product.product/lists', {
				product_type: 2
			},
				res => {
					self.brandCol = res.data.list.data;
					self.changeBrand()
				})
		},
		changeBrand(e) {
			if (e) {
				this.brandVal = e.detail.value
			} else {
				this.brandVal = 0
			}
			// this.brandVal = e.detail.value
			this.brandName = this.brandCol[this.brandVal].product_name
			this.product_id = this.brandCol[this.brandVal].product_id
			// 获取型号数据
			this.getSpecData()
		},
		getSpecData() {
			let self = this
			self._post('product.product/getSpec', {
				product_id: self.product_id,
			},
				res => {
					self.spec_list = res.data.spec_list
					self.spec_attr = []
					res.data.spec_attr.forEach((item, index) => {
						let item_value = ''
						let item_name = ''
						// if (item.group_name.includes('期')) {
						item_value = item.spec_items[0].item_id
						item_name: item.spec_items[0].spec_value
						// }
						let obj = {
							...item,
							item_value: item_value,
							item_name: item_name
						}
						self.spec_attr.push(obj)
						self.specChangeModel(null, index)
					})
				})
		},
		specChangeModel(e, index) {
			let value
			if (e !== null) {
				value = e.detail.value;
			} else {
				value = 0
			}
			this.spec_attr[index].item_value = this.spec_attr[index].spec_items[value].item_id;
			this.spec_attr[index].item_name = this.spec_attr[index].spec_items[value].spec_value;
			this.specListModel()
		},
		specListModel() {
			const self = this;
			self.specSkuId = self.spec_attr.map(item => item.item_value).join('_');
			const matchedSpec = self.spec_list.find(item => item.spec_sku_id === self.specSkuId);
			if (matchedSpec) {
				self.deposit = matchedSpec.spec_form.deposit;
				self.price = matchedSpec.spec_form.line_price;
			}
		},
		startDateChange(e) {
			this.start_time = e.detail.value.replace(/\//g, '-')
			this.createOrderBill()
		},
		endDateChange(e) {
			this.end_time = e.detail.value.replace(/\//g, '-')
			this.createOrderBill()
		},
		getBill() {
			this.createOrderBill()
		},
		createOrderBill() {
			let self = this;
			if (self.start_time == '请选择开始时间' || self.end_time == '请选择结束时间' || Number(self.price) <= 0) return
			self._post('order.order/createOrderBill', {
				price: self.price,
				startDay: self.start_time,
				endDay: self.end_time
			},
				res => {
					self.orderBill = []
					self.orderBill = res.data
					self.totalRental = self.orderBill.reduce((sum, item) => {
						return sum + Number(item.price);
					}, 0).toFixed(2);
				})
		},
		eidtPrice(item, index) {
			this.showLogin = true
			this.editIndex = index
			this.editJe = item.price
		},
		editTrue() {
			let self = this
			self.orderBill[self.editIndex].price = self.editJe
			self.totalRental = self.orderBill.reduce((sum, item) => {
				return sum + Number(item.price);
			}, 0).toFixed(2);
			self.showLogin = false
		},
		nextStep() {
			let self = this
			if (self.start_time == '请选择开始时间' || self.end_time == '请选择结束时间' || Number(self.price) <= 0 || Number(self
				.deposit) <= 0) {
				uni.showToast({
					title: '请将规格填写完整'
				});
			}
			self._post('order.fast_order/addOrder', {
				bill_list: JSON.stringify(self.orderBill),
				product_id: self.product_id,
				spec_sku_id: self.specSkuId,
				deposit: self.deposit,
				shop_supplier_id: self.shop_supplier_id,
			},
				res => {
					console.log(res)
					uni.navigateTo({
						url: `/pages/order/order-creation?redirectUrl=${encodeURIComponent(res.data)}&numprice=${self.orderBill[0].price}&deposit=${self.deposit}&totalRental=${self.totalRental}`
					});
				})
		},
		processPercentageField(value) {
			const containsPercentageRegex = /%|%%|百分之\d+/;
			if (containsPercentageRegex.test(value)) {
				return value;
			}
			return value + '%';
		},
		blurPrice() {
			let n = (this.price * 1).toFixed(2)
			if (Number(n) > Number(this.guide_price) && this.guide_price) {
				uni.showToast({
					title: '售价需小于等于最高售价'
				});
			}
		},


		// 选择品牌类型

		// 选择型号
		changeModel(e) {
			console.log(e, '=-=-=-=-=-型号');
			if (e) {
				this.modelVal = e.detail.value
			} else {
				this.modelVal = 0
			}
			this.modelName = this.modelCol[this.modelVal].model
			this.product_id = this.modelCol[this.modelVal].id
			this.memoryCol = []
			this.memoryVal = 0
			this.memoryName = '请选择内存'
			this.colorCol = []
			this.colorVal = 0
			this.colorName = '请选择颜色'
			this.chengseVal = 0
			this.chengseCol = []
			this.chengseName = '请选择成色'
			this.downpayCol = []
			this.downpayColMonth = []
			this.downpayCol1 = []
			this.billData = []
			this.active2 = -1
			this.active = -1
			this.showCountMeau = false
			// 获取内存信息
			this.getMemoryData()
		},
		// 获取型号数据
		// getModelData() {
		// 	let self = this
		// 	self._post('product.product/lists', {
		// 			app_id: 10001,
		// 			product_id: self.product_id,
		// 			car_lease: self.car_lease
		// 		},
		// 		res => {
		// 			console.log(res, '-------------型号数据');
		// 			let data = res.data.list.data
		// 			self.modelCol = []
		// 			for (var i = 0; i < data.length; i++) {
		// 				self.modelCol.push({
		// 					id: data[i].product_id,
		// 					model: data[i].product_desc
		// 				})
		// 			}
		// 			self.changeModel()
		// 		})
		// },
		removeDuplicatesByDownPaymentRatio(array) {
			const seenRatios = new Set();
			const uniqueItems = [];
			array.forEach(item => {
				const ratio = item.down_payment_ratio;
				if (!seenRatios.has(ratio)) {
					seenRatios.add(ratio);
					uniqueItems.push(item);
				}
			});
			return uniqueItems;
		},
		// 选择内存
		changeMemory(e) {
			this.active = -1
			this.active2 = -1
			this.showZulin = false
			this.showCountMeau = false

			if (e) {
				this.memoryVal = e.detail.value
			} else {
				this.memoryVal = 0
			}
			console.log(this.memoryCol, this.memoryVal, '====1111')
			this.memoryName = this.memoryCol[this.memoryVal].memory
			let arr
			arr = this.product_sku_id.split('_')
			if (arr.length >= 1 && arr[0] !== '') {
				arr[0] = this.memoryCol[this.memoryVal].id
				this.product_sku_id = arr.join('_')
			} else {
				this.product_sku_id = this.memoryCol[this.memoryVal].id + '_'
			}
			this.downpayCol1 = []
			this.downpayCol = []
			this.configuration.forEach((item, index) => {
				let itemnum = parseInt(item.memory.match(/\d+/)[0], 10)
				let indexnum = parseInt(this.memoryName.match(/\d+/)[0], 10)
				if (itemnum == indexnum) {
					this.downpayCol1.push(item)
				}
			})
			this.downpayCol = this.removeDuplicatesByDownPaymentRatio(this.downpayCol1);
			if (this.downpayCol.length == 0) {
				uni.showToast({
					title: "此规格商家尚未配置，请切换型号！",
					duration: 2000,
					position: 200,
				})
				return
			}
			this.downpayColMonth = []
			console.log(this.downpayCol, 'downpayColdownpayColdownpayCol')
			this.getGuidePprice()
		},
		// 获取内存数据
		getMemoryData() {
			let self = this
			self._post('product.product/detail', {
				app_id: 10001,
				product_id: self.product_id,
				url: '',
				visitcode: ''
			}, res => {
				console.log(res, '--=================内存');
				self.configuration = res.data.detail.configuration
				// 内存规格相关数据
				self.skuData = res.data.detail.sku
				self.reallyPrice = res.data.detail.product_sku.guide_price
				console.log(self.reallyPrice, '===============付款总价');
				// 首付配置
				self.downpayCol_1 = res.data.detail.configuration
				// 具体规格参数
				let data = res.data.specData.spec_attr;
				for (let i = 0; i < data.length; i++) {
					// 内存数据
					if (data[i].group_name == '内存') {
						let info = data[i].spec_items;
						self.memoryCol = []
						for (let s = 0; s < info.length; s++) {
							self.memoryCol.push({
								id: info[s].item_id,
								memory: info[s].spec_value
							})
						}
					}
					// 颜色数据
					if (data[i].group_name == '颜色') {
						let info = data[i].spec_items;
						self.colorCol = []
						for (let s = 0; s < info.length; s++) {
							self.colorCol.push({
								id: info[s].item_id,
								color: info[s].spec_value
							})
						}
					}
					// 成色数据
					if (data[i].group_name == '成色') {
						let info = data[i].spec_items;
						self.chengseCol = []
						for (let s = 0; s < info.length; s++) {
							self.chengseCol.push({
								id: info[s].item_id,
								chengse: info[s].spec_value
							})
						}
					}
				}
				self.changeMemory()
				self.changeColor()
				if (self.new_machine == 2) {
					self.changeChengse()
				}
			})
		},
		// 选择颜色
		changeColor(e) {
			this.active = -1
			this.active2 = -1
			this.showZulin = false
			this.showCountMeau = false

			console.log(e, '------------------颜色数据')
			if (e) {
				this.colorVal = e.detail.value
			} else {
				this.colorVal = 0
			}
			this.colorName = this.colorCol[this.colorVal].color
			console.log(this.product_sku_id)
			console.log(this.product_sku_id.split('_'))
			let arr
			arr = this.product_sku_id.split('_')
			if (arr.length >= 2) {
				arr[1] = this.colorCol[this.colorVal].id
				this.product_sku_id = arr.join('_')
			} else {
				this.product_sku_id = this.product_sku_id + this.colorCol[this.colorVal].id
			}

			this.sku = this.skuData[this.colorVal]
			// 商品指导价
			this.guide_price = this.sku.guide_price
			this.getGuidePprice()
		},
		//选择成色
		changeChengse(e) {
			this.active = -1
			this.active2 = -1
			this.showZulin = false
			this.showCountMeau = false
			if (e) {
				this.chengseVal = e.detail.value
			} else {
				this.chengseVal = 0
			}
			console.log(e, '=====成色');
			this.chengseName = this.chengseCol[this.chengseVal].chengse


			let arr
			arr = this.product_sku_id.split('_')
			if (arr.length >= 3) {
				arr[2] = this.chengseCol[this.chengseVal].id
				this.product_sku_id = arr.join('_')
			} else {
				this.product_sku_id = this.memoryCol[this.memoryVal].id + '_' + this.colorCol[this.colorVal].id + '_' +
					this.chengseCol[
						this.chengseVal].id
			}
			this.getGuidePprice()
		},
		// 获取服务费
		getServicePrice() {
			this.downpayCol_1.forEach((item, index) => {
				if (this.down_payment_ratio_shou == item.down_payment_ratio && this.zulinMonth == item
					.number_of_periods && this.memoryName == item.memory) {
					console.log(item, 'item')
					this.down_payment = item.id
				}
			})
			console.log(this.down_payment, '-----------------------==服务费');
		},
		// 指导价
		getGuidePprice() {
			this.skuData.forEach(item => {
				if (this.product_sku_id == item.spec_sku_id) {
					this.reallyPrice = item.official_website_price
					console.log(this.reallyPrice, Number(this.reallyPrice * (this.yield / 100)),
						'-=-=-=-=-=-=-=-=-=指导价格');
				}
			})
		},
		//选择期数
		changenDownZulin(e, index) {
			if (this.price == '') {
				uni.showToast({
					title: '请填写售价'
				});
			} else {
				console.log(e)
				this.active2 = index
				this.zulinMonth = e.number_of_periods
				this.billData = []
				this.yield = e.yield
				this.getServicePrice()
				this.getBillData()
			}
		},

		// 选择首付金额
		changenDownpay(e, index) {
			this.downpayColMonth = []
			this.active2 = -1
			this.active = index
			this.showZulin = true
			this.down_payment_ratio_shou = e.down_payment_ratio
			this.downpayCol1.forEach((item, index) => {
				console.log(item, '111')
				if (item.down_payment_ratio == e.down_payment_ratio) {
					console.log(item)
					this.downpayColMonth.push(item)
				}
			})
			this.getServicePrice()
		},
		// 获取账单明细数据
		getBillData() {
			console.log(this.price, ' this.price')
			this.totlePrice = (Number(this.price) + Number(this.price * (this.yield / 100))).toFixed(
				2) //总计
			// this.price = this.totlePrice
			console.log(this.totlePrice, ' 总价')
			let fir = (Number(this.price) * Number(this.down_payment_ratio_shou / 100)).toFixed(2)
			console.log(fir, 'firfir')
			let yue = Number(this.totlePrice) - Number(fir)
			console.log(yue, 'yueyue')
			let sec = Number(yue / (this.zulinMonth - 1))
			console.log(sec, 'secsec')
			let zong = Number(sec).toFixed(2)
			console.log(zong, 'zongzong')
			let time = new Date();
			for (let i = 0; i < this.zulinMonth; i++) {
				if (i == 0) {
					let obj = {
						name: '首期',
						price: fir,
						time: this.getRecentMonth_Date(i)
					}
					console.log(obj, '------------------')
					this.billData[0] = obj
				}
				if (i > 0) {
					let obj2 = {
						name: '第' + i + '期',
						//  5500-(500+100*3) / 12-(1+3)  5500-800/12-4   4700/8

						price: zong,
						time: this.getRecentMonth_Date(i)
					}
					this.billData[i] = obj2
				}
			}
		},
		getRecentMonth_Date(n) {
			let result = '';
			const datenow = new Date();
			const dateend =
				datenow.getFullYear().toString() +
				'-' +
				(datenow.getMonth() + 1).toString() +
				'-' +
				datenow.getDate().toString();
			datenow.setMonth(datenow.getMonth() + n);
			let dyear = datenow.getFullYear();
			let dmonth = datenow.getMonth() + 1;
			dmonth = dmonth < 10 ? 0 + dmonth : dmonth;
			let dday = datenow.getDate();
			const datestart =
				dyear.toString() + '-' + dmonth.toString() + '-' + dday.toString();
			result += datestart
			return result;
		},




		// 支付宝登录
		async onGetAuthorize() {
			let tguser_id = uni.getStorageSync('tguser_id');
			try {
				const { authCode, userInfo } = await getAlipayAuthCode('phone');
				this._post('user.usermp/mnpAlipayAuthLogin', {
					code: authCode,
					content: userInfo,
					tguser_id: tguser_id
				}, res => {
					if (res.data.code == 0) {
						uni.showToast({
							title: res.data.msg
						});
					} else {
						this.token = res.data.data
							.token
						uni.setStorageSync('token', res
							.data.data
							.token);
						uni.setStorageSync('user_id',
							res
								.data.data
								.user_id);
						uni.showToast({
							title: '登录成功'
						});
						this.nextStep()
					}
				}
				)
			} catch (error) {
				console.error("登录失败", error);
			}
			// 获取授权码
			// my.getAuthCode({
			// 	scopes: ['auth_base'],
			// 	success: (res) => {
			// 		my.getPhoneNumber({
			// 			success: (res1) => {
			// 				let encryptedData = res1.response;
			// 				encryptedData = JSON.parse(encryptedData);
			// 				let response = encryptedData.response
			// 				this._post('user.usermp/mnpAlipayAuthLogin', {
			// 					code: res.authCode,
			// 					content: response,
			// 					tguser_id: tguser_id
			// 				}, res => {
			// 					if (res.data.code == 0) {
			// 						uni.showToast({
			// 							title: res.data.msg
			// 						});
			// 					} else {
			// 						this.token = res.data.data
			// 							.token
			// 						uni.setStorageSync('token', res
			// 							.data.data
			// 							.token);
			// 						uni.setStorageSync('user_id',
			// 							res
			// 							.data.data
			// 							.user_id);
			// 						uni.showToast({
			// 							title: '登录成功'
			// 						});
			// 						this.nextStep()
			// 					}
			// 				})
			// 			},
			// 			fail: (res) => {
			// 				this.nextStep()
			// 				reject(res);
			// 			}
			// 		});
			// 	},
			// });
		},
	},

	mounted() { },
}
</script>

<style lang="less">
.zhibao {
	padding: 20rpx 40rpx;
	background-color: #fff;

	.zhibao_item {
		font-size: 32rpx;
		padding: 30rpx 20rpx;
		display: flex;
		margin-bottom: 2rpx;
		border-radius: 12rpx;
		background-color: #f3f3f3;

		.zhibao_title {
			width: 200rpx;
			margin-right: 6rpx;
		}
	}

}


.page {
	background-color: #f3f3f3;
}

.downpayBox {
	display: flex;
	justify-content: flex-start;
	flex-wrap: wrap;
}

.downpayItem {
	background-color: #eef7fe;
	width: 180rpx;
	height: 70rpx;
	color: #14AAA8;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30rpx;
	margin-right: 15rpx;
	margin-bottom: 15rpx;
}

.activeItem {
	background-color: #14AAA8;
	width: 180rpx;
	height: 70rpx;
	color: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 30rpx;
	margin-right: 15rpx;
	margin-bottom: 15rpx;
}

.tabsBox {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 80rpx;
}

.tabsBox .tabItem {
	flex: 1;
	height: 100rpx;
	border-radius: 0px 0px 0px 0px;
	opacity: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 32rpx;
	flex-direction: column;
	position: relative;
	background-color: #ffffff;
}

.tabItemClass {
	color: #14AAA8;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-direction: column;
}

.activeBox {
	width: 32rpx;
	height: 6rpx;
	opacity: 1;
	background-color: #14AAA8;
	position: absolute;
	bottom: 0;
}

.oldBox {}

.mainBox {
	background-color: #ffffff;
	margin: 30rpx 20rpx;
	padding: 30rpx 30rpx;
	border-radius: 30rpx;
}

.zhibaoTime {
	width: 136rpx;
	height: 80rpx;
	background: #14AAA8;
	border-radius: 12rpx;
	opacity: 1;
	font-weight: 600;
	color: #FFFFFF;
	font-size: 32rpx;
	display: flex;
	align-items: center;
	justify-content: center;
}

.tipBox {
	width: 662rpx;
	height: 208rpx;
	background-color: #FFF7E8;
	border-radius: 15rpx;
}

.tipTop {
	display: flex;
	padding-top: 10rpx;
}

.tipBot {
	width: 500rpx;
	font-size: 28rpx;
	font-weight: 400;
	color: #FF7D00;
	align-items: center;
	margin: 20rpx auto;
}

.tipBot1 {
	width: 300rpx;
	font-size: 28rpx;
	font-weight: 400;
	color: #FF7D00;
	align-items: center;
	margin: 20rpx auto;
}

.lefticon {
	width: 120rpx;
	height: 48rpx;
}

.lefticon image {
	width: 120rpx;
	height: 48rpx;
}

.title {
	height: 50rpx;
	font-size: 32rpx;
	// font-weight: 500;
	color: rgba(0, 0, 0, 0.9);
	line-height: 44rpx;
	font-weight: bold;
}

.infoItem {
	width: 95%;
	height: 90rpx;
	font-size: 30rpx;
	border-radius: 10rpx;
	padding: 0 20rpx;
	// background-color: #f6f6f6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12rpx;
	border-bottom: 2rpx solid #f1f1f1;
}

.infoItem1 {
	width: 95%;
	font-size: 30rpx;
	border-radius: 10rpx;
	padding: 0 20rpx;
	background-color: #f6f6f6;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12rpx;
	border-bottom: 2rpx solid #f6f6f6;
}

.leftText {
	font-size: 32rpx;
	font-weight: 530;
	color: rgba(0, 0, 0, 0.9);
	line-height: 48rpx;
	width: 170rpx;
}

.guideText {
	font-size: 30rpx;
	font-weight: 400;
	color: rgba(0, 0, 0, 0.9);
	line-height: 40rpx;
}

.rightText {
	font-size: 32rpx;
	font-weight: 400;
	// color: rgba(0, 0, 0, 0.4);/*  */
	line-height: 48rpx;
}

.priceItem {
	width: 100%;
	height: 70rpx;
	border-radius: 10rpx;
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 12rpx;
}

.Pitem {
	background-color: #f6f6f6;
	flex: 1;
	border-radius: 10rpx;
	height: 90rpx;
	line-height: 70rpx;
	padding: 0 30rpx;
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 15rpx;
}

.Pitem1 {
	background-color: #f6f6f6;
	flex: 1;
	border-radius: 10rpx;
	height: 100rpx;
	line-height: 70rpx;
	padding: 0 30rpx;
	display: flex;
	justify-content: space-between;
	margin-top: 15rpx;
	font-size: 25rpx;
	align-items: center;
}

.Pitem1Time {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	justify-content: center;
}

.tip {
	color: #EF3723;
	font-size: 21rpx;
	margin: 22rpx;
}

.botBox {
	width: 100%;
	height: 180rpx;
	background-color: #ffffff;
	position: fixed;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

.nextPage {
	width: 90%;
	// border-radius: 40rpx;
	height: 80rpx;
	background-color: #3FD2CC;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #ffffff;
}
</style>